import request from '@/utils/request'

// 查询长期工通行记录列表
export function listRecord(query) {
  return request({
    url: '/traffic/record/list',
    method: 'get',
    params: query
  })
}

// 查询长期工通行记录详细
export function getRecord(staffName) {
  return request({
    url: '/traffic/record/' + staffName,
    method: 'get'
  })
}

// 新增长期工通行记录
export function addRecord(data) {
  return request({
    url: '/traffic/record',
    method: 'post',
    data: data
  })
}

// 修改长期工通行记录
export function updateRecord(data) {
  return request({
    url: '/traffic/record',
    method: 'put',
    data: data
  })
}

// 删除长期工通行记录
export function delRecord(staffName) {
  return request({
    url: '/traffic/record/' + staffName,
    method: 'delete'
  })
}

// 导出长期工通行记录
export function exportRecord(query) {
  return request({
    url: '/traffic/record/export',
    method: 'get',
    params: query
  })
}
